package com.example.service.serviceImp;

import com.example.dao.ShareMapper;
import com.example.pojo.NewPhoto;
import com.example.pojo.Share;
import com.example.service.ShareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service("ShareService")
public class ShareServiceImpl implements ShareService {
    @Autowired
    public ShareMapper shareMapper;

    @Override
    public int addNewShare(Share share) {
        shareMapper.insert(share);
        return 1;
    }

    @Override
    public int deleteShare(Integer shareId) {
        shareMapper.deleteById(shareId);
        return 0;
    }
}
